home *** CD-ROM | disk | FTP | other *** search
- ; Author: M. Steven Baker
- ; Date: November 22, 1986
- ; Revision date: September 20, 1987 revised for Microsoft
- ;
- ;
- ; long time18(0) -- returns timer counter in 18.2 counts/second
- ; long time18(long * loc) -- also stores timer count in loc
- ;
- ; Version of Time() for Digital Research Fortran to emulate UNIX time()
- ; returns timer interrupt count from BIOS data area
- ; count = 18.2 ticks per second
- ; this version set up for DRI Fortran-77
- ;
-
- timer_low equ 6ch
- timer_high equ 6eh
-
- ;
- cseg
-
- public TIME18
- ;
- TIME18: push ds ;save DS
- mov ax,40h ;point to ROM BIOS area
- mov ds,ax
- cli ;shut off interrupts
- mov ax,ds:.timer_low ;timer_low
- mov bx,ds:.timer_high ;timer_high
- sti
- pop ds
- retf
-
- end
-